//
//  ConnectModel.h
//  LaoGanMa_v2
//
//  Created by 刘畅 on 14-12-18.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^ConnectBlock)(NSData * resultData);

@interface ConnectModel : NSObject<NSURLConnectionDataDelegate>
@property (nonatomic, retain)NSMutableData * myData;
@property (nonatomic, copy) ConnectBlock myBolck;
+ (void)connectModelWithUrl:(NSString *)str parmaters:(NSDictionary *)parmaters finish:(ConnectBlock)block;

// 上传图片
+ (void)uploadWithImageName:(NSString *)name imageData:(NSData *)imageData finish:(ConnectBlock)block;

// 同步请求
+ (NSData *)connectModelWithUrl:(NSString *)urlStr;

@end
